package com.huyanqi.entity;

import java.util.Calendar;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.huyanqi.core.BaseDomainObject;
import com.huyanqi.core.util.JaxbCalendarSerializer;

@Entity
@Table(name = "s_shopactivity")
@XmlAccessorType(XmlAccessType.FIELD)
public class Shopactivity extends BaseDomainObject {
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Id
	@Column(name="a_id",nullable=false)
	@XmlElement
	@Basic(fetch=FetchType.EAGER)
	private Long aId;

	public void setAId(Long aId) {
		this.aId = aId;
	}
	public Long getAId() {
		return aId;
	}

	@Column(name="a_title")
	@XmlElement
	@Basic(fetch=FetchType.EAGER)
	private String aTitle;

	public void setATitle(String aTitle) {
		this.aTitle = aTitle;
	}
	public String getATitle() {
		return aTitle;
	}

	@Column(name="a_content")
	@XmlElement
	@Basic(fetch=FetchType.EAGER)
	private String aContent;

	public void setAContent(String aContent) {
		this.aContent = aContent;
	}
	public String getAContent() {
		return aContent;
	}

	@Column(name="a_time")
	@XmlElement
	@Basic(fetch=FetchType.EAGER)
	@XmlJavaTypeAdapter(JaxbCalendarSerializer.class)
	@Temporal(TemporalType.TIMESTAMP)	
	private Calendar aTime;

	public void setATime(Calendar aTime) {
		this.aTime = aTime;
	}
	public Calendar getATime() {
		return aTime;
	}

	@Column(name="a_shop")
	@XmlElement
	@Basic(fetch=FetchType.EAGER)
	private Long aShop;

	public void setAShop(Long aShop) {
		this.aShop = aShop;
	}
	public Long getAShop() {
		return aShop;
	}

	@Column(name="a_set")
	@XmlElement
	@Basic(fetch=FetchType.EAGER)
	private Long aSet;

	public void setASet(Long aSet) {
		this.aSet = aSet;
	}
	public Long getASet() {
		return aSet;
	}

}